﻿using IBLL.Dto;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IBLL
{
    public interface IHodeBLL
    {
        /// <summary>
        /// 添加折扣劵
        /// </summary>
        /// <param name="hode"></param>
        /// <returns>返回受影响行数</returns>
        Task<int> AddAsync(Hode hode);
        /// <summary>
        /// 展示所有折扣劵
        /// </summary>
        /// <returns>返回受影响行数</returns>
        IQueryable<Hode> GetAll();
        /// <summary>
        /// 根据编号id删除一条折扣劵信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns>返回受影响行数</returns>
        Task<int> DeleteAsync(int id);
        /// <summary>
        /// 条件查询、折扣劵名称模糊查询
        /// </summary>
        /// <param name="index">页码</param>
        /// <param name="size">页容量</param>
        /// <param name="name">折扣劵名称</param>
        /// <returns>返回受影响行数</returns>
        GetHodePageDto<Hode> GetHodePage(int index, int size, string? name);
    }
}
